package com.tao.springbootconfigprefile.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@Data
@ConfigurationProperties(prefix = "datasource.druid")

@EnableConfigurationProperties()
public class DataSourceConfig{
//    @Value("${datasource.druid.url}")
    String url;
//    @Value("${datasource.druid.username}")
    String username;
//    @Value("${datasource.druid.password}")
    String password;
//    @Value("${datasource.druid.driver-class-name}")
    String driver;
}
